package ink.xiaobaibai.service.impl;

import ink.xiaobaibai.enumOxy.BusinessType;
import ink.xiaobaibai.service.ISmsCodeSender;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.stereotype.Service;

/**
 * @description: 默认的短信发送实现类
 * @author: 小白白
 * @create: 2021-05-16
 **/

@Service
@ConditionalOnMissingBean(name = "smsCodeSender")
@Slf4j
public class DefaultSmsCodeSender implements ISmsCodeSender {

    @Override
    public void sendVerCode(String mobile, String code) {
        log.error("请自定义实现本方法");
        log.info("手机号:{},验证码:{}", mobile, code);
    }

    @Override
    public void sendFaultMessage(String mobile, String deviceCode, boolean isOxy, BusinessType businessType) {
        log.error("机器故障");
        log.error("手机号:{},机器码:{}", mobile, deviceCode);
    }

}
